﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ActionSystem.Core
{
    public abstract class BasePassiveActionHandler
    {
        /// <summary>
        /// 初始化
        /// </summary>
        /// <param name="stateMachine"></param>
        public abstract void Begin(BasePassiveActionConfig config,BaseStateMachine stateMachine);
        /// <summary>
        /// 更新
        /// </summary>
        /// <param name="stateMachine">当前状态机</param>
        /// <param name="updateLogicAction">是否更新到下一个逻辑帧</param>
        /// <param name="deltaTime"></param>
        public abstract void Update(BasePassiveActionConfig config, BaseStateMachine stateMachine, bool updateLogicAction, float deltaTime);
        /// <summary>
        /// 结束
        /// </summary>
        /// <param name="stateMachine"></param>
        public abstract void End(BasePassiveActionConfig config, BaseStateMachine stateMachine);
        /// <summary>
        /// 判断是否结束
        /// </summary>
        /// <param name="stateMachine"></param>
        /// <returns></returns>
        public abstract bool CheckEnd(BasePassiveActionConfig config, BaseStateMachine stateMachine);
        public virtual void Reset() { }
    }
}
